package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.DetailsMapper;
import com.ruoyi.order.domain.Details;
import com.ruoyi.order.service.IDetailsService;

/**
 * 订单详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-12
 */
@Service
public class DetailsServiceImpl implements IDetailsService 
{
    @Autowired
    private DetailsMapper detailsMapper;

    /**
     * 查询订单详情
     * 
     * @param orderDetailsId 订单详情主键
     * @return 订单详情
     */
    @Override
    public Details selectDetailsByOrderDetailsId(Long orderDetailsId)
    {
        return detailsMapper.selectDetailsByOrderDetailsId(orderDetailsId);
    }

    /**
     * 查询订单详情列表
     * 
     * @param details 订单详情
     * @return 订单详情
     */
    @Override
    public List<Details> selectDetailsList(Details details)
    {
        return detailsMapper.selectDetailsList(details);
    }

    /**
     * 新增订单详情
     * 
     * @param details 订单详情
     * @return 结果
     */
    @Override
    public int insertDetails(Details details)
    {
        return detailsMapper.insertDetails(details);
    }

    /**
     * 修改订单详情
     * 
     * @param details 订单详情
     * @return 结果
     */
    @Override
    public int updateDetails(Details details)
    {
        return detailsMapper.updateDetails(details);
    }

    /**
     * 批量删除订单详情
     * 
     * @param orderDetailsIds 需要删除的订单详情主键
     * @return 结果
     */
    @Override
    public int deleteDetailsByOrderDetailsIds(Long[] orderDetailsIds)
    {
        return detailsMapper.deleteDetailsByOrderDetailsIds(orderDetailsIds);
    }

    /**
     * 删除订单详情信息
     * 
     * @param orderDetailsId 订单详情主键
     * @return 结果
     */
    @Override
    public int deleteDetailsByOrderDetailsId(Long orderDetailsId)
    {
        return detailsMapper.deleteDetailsByOrderDetailsId(orderDetailsId);
    }
}
